Optimal. Leaf size=145 \[ \frac {C \sec ^{1+m}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}-\frac {(C (m+n)+A (1+m+n)) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-m-n);\frac {1}{2} (3-m-n);\cos ^2(c+d x)\right ) \sec ^{-1+m}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (1-m-n) (1+m+n) \sqrt {\sin ^2(c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 145, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {20, 4131, 3857,
2722} \begin {gather*} \frac {C \sin (c+d x) \sec ^{m+1}(c+d x) (b \sec (c+d x))^n}{d (m+n+1)}-\frac {(A (m+n+1)+C (m+n)) \sin (c+d x) \sec ^{m-1}(c+d x) (b \sec (c+d x))^n \, _2F_1\left (\frac {1}{2},\frac {1}{2} (-m-n+1);\frac {1}{2} (-m-n+3);\cos ^2(c+d x)\right )}{d (-m-n+1) (m+n+1) \sqrt {\sin ^2(c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 20
Rule 2722
Rule 3857
Rule 4131
Rubi steps
\begin {align*} \int \sec ^m(c+d x) (b \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx &=\left (\sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{m+n}(c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx\\ &=\frac {C \sec ^{1+m}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\left (\left (A+\frac {C (m+n)}{1+m+n}\right ) \sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{m+n}(c+d x) \, dx\\ &=\frac {C \sec ^{1+m}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\left (\left (A+\frac {C (m+n)}{1+m+n}\right ) \cos ^{m+n}(c+d x) \sec ^m(c+d x) (b \sec (c+d x))^n\right ) \int \cos ^{-m-n}(c+d x) \, dx\\ &=\frac {C \sec ^{1+m}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}-\frac {\left (A+\frac {C (m+n)}{1+m+n}\right ) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-m-n);\frac {1}{2} (3-m-n);\cos ^2(c+d x)\right ) \sec ^{-1+m}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (1-m-n) \sqrt {\sin ^2(c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 6.32, size = 303, normalized size = 2.09 \begin {gather*} -\frac {i 2^{1+m+n} e^{-i d (m+n) x} \left (\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}\right )^{m+n} \left (1+e^{2 i (c+d x)}\right )^{m+n} \left (\frac {A e^{i d (m+n) x} \, _2F_1\left (\frac {m+n}{2},2+m+n;\frac {1}{2} (2+m+n);-e^{2 i (c+d x)}\right )}{m+n}+e^{2 i c} \left (\frac {2 (A+2 C) e^{i d (2+m+n) x} \, _2F_1\left (\frac {1}{2} (2+m+n),2+m+n;\frac {1}{2} (4+m+n);-e^{2 i (c+d x)}\right )}{2+m+n}+\frac {A e^{i (2 c+d (4+m+n) x)} \, _2F_1\left (2+m+n,\frac {1}{2} (4+m+n);\frac {1}{2} (6+m+n);-e^{2 i (c+d x)}\right )}{4+m+n}\right )\right ) \sec ^{-2-n}(c+d x) (b \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right )}{d (A+2 C+A \cos (2 c+2 d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.40, size = 0, normalized size = 0.00 \[\int \left (\sec ^{m}\left (d x +c \right )\right ) \left (b \sec \left (d x +c \right )\right )^{n} \left (A +C \left (\sec ^{2}\left (d x +c \right )\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (b \sec {\left (c + d x \right )}\right )^{n} \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{m}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (\frac {b}{\cos \left (c+d\,x\right )}\right )}^n\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^m \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________